<include file="Public:header" />
<section role="main" class="content-body">
    <header class="page-header"></header>
    <!-- start: page -->
    <section class="panel">
        <header class="panel-heading">
            <h2 class="panel-title">更改密码</h2></header>
        <div class="panel-body">
            <form class="selects-form" method="post" id="form" autocomplete="off">
                <div class="row">
                    <label class="col-md-2 control-label">密码</label>
                    <div class="col-md-6">
                        <input class="form-control mb-md" type="password" name="password" placeholder="" value=""></div>
                </div>
                <div class="row">
                    <label class="col-md-2 control-label">新密码</label>
                    <div class="col-md-6">
                        <input class="form-control mb-md" type="password" name="password1" placeholder="" value=""></div>
                </div>
                <div class="row">
                    <label class="col-md-2 control-label">确认新密码</label>
                    <div class="col-md-6">
                        <input class="form-control mb-md" type="password" name="password2" placeholder="" value=""></div>
                </div>
                <div class="row">
                    <label class="col-md-2 control-label"></label>
                    <div class="col-md-6">
                        <button class="btn btn-primary" onclick="sub()" type="button" name="submit">更改密码</button>
                        <button class="btn btn-default" type="button">取消</button>
                        <img src="images/loading.gif" height="50" width="50" class="loading" style="display:none;"></div>
                </div>
            </form>
        </div>
    </section>
    <!-- start: sidebar-right -->
    <!-- start: sidebar-right -->
    <aside id="sidebar-right" class="sidebar-right">
        <div class="nano has-scrollbar">
            <div class="nano-content" tabindex="0" style="right: -17px;">
                <a href="#" class="mobile-close visible-xs">回到儀表板
                    <i class="fa fa-chevron-right"></i></a>
            </div>
            <div class="nano-pane" style="display: none; opacity: 1; visibility: visible;">
                <div class="nano-slider" style="height: 472px; transform: translate(0px, 0px);"></div>
            </div>
        </div>
    </aside>
    <!-- end: sidebar-right -->
    <!-- end: sidebar-right -->
</section>
		<script>
		function sub(){
			$.ajax({
				 type: "POST",
				 url: "{:U('User/changeTwoPasswordSub')}",
				 data: $("#form").serialize(),
				 dataType: "json",
				 error: function(request) {
					layer.closeAll('loading');
					layer.msg("{$Think.lang.系统繁忙请稍后再试}");
				},
				beforeSend: function() {
					var index = layer.load(1, {
					  shade: [0.1,'#fff'] 
					});
				},
				 success: function(data){
						layer.closeAll('loading');
						layer.msg(data['info']);
						if(data['status']==true){
							setTimeout(function(){self.location.href="{:U('User/index')}"},1000);
						}else{
							changeverify();
						}
					}
			});
		};
		</script>
<include file="Public:footer" />